function login(){
    var username = $('username').val();
    var password = $('password').val();
    var data = {'username':username,'password':password};
    $.ajax({
        url:'login',
        type:'POST',
        data:data,
        success:function(data,status){
            if (status == 'success'){
                location.href = '/';
            }
        },
        error:function(data,status,e){
            if (status == 'error'){
                location.href = 'zz_login';
            }
        }
    });
}